package main

import "fmt"

type Person struct {
	name string
	sex  int
	age  int
}

func (p *Person) setPersonPoint(name string, sex int, age int) {
	p.name = name
	p.sex = sex
	p.age = age
}

func (p Person) setPersonValue(name string, sex int, age int) {
	p.name = name
	p.sex = sex
	p.age = age
}

func main() {
	s := Person{"lucy", 'm', 11}
	fmt.Println("s =", s) // s = {lucy 109 11}

	s.setPersonValue("alfo", 'w', 12)
	fmt.Println("s =", s) // s = {lucy 109 11}

	(&s).setPersonPoint("alfo", 'w', 13)
	fmt.Println("s =", s) // s = {alfo 119 13}
}
